package com.itheima;

import com.itheima.dao.BookDao;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
//初始化BeanFactory
public class AppForBeanFactory {
    public static void main(String[] args) {
      Resource resource=new ClassPathResource("applicationContext.xml");
      BeanFactory beanFactory=new XmlBeanFactory(resource);
      /*BookDao bookDao=beanFactory.getBean(BookDao.class);
      bookDao.save();*/
    }
}
